public class juanwang {
    public static void main(String[] args) {
        int[][] rou = new int[][] { { 85, 85, 86, 73, 66, 114, 51, 99 }, { 71, 103, 44, 87, 112, 78, 36 }};
        double[] rowprice = new double[7];

        int[][] cai = new int[][] { { 35, 44, 27, 41, 65, 38 }, { 41, 46, 13, 74, 71, 27 }};
        double[] caiprice = new double[6];

        for (int i = 0; i < 7; i++) {
            if(i<6) caiprice[i] = cai[1][i] / (cai[0][i] + 0.0);
            rowprice[i] = rou[1][i] / (rou[0][i]+0.0);
        }
        for (int i = 0; i < caiprice.length; i++) {
            System.out.print(caiprice[i] + " ");   
        }
        System.out.println();
        for (int i = 0; i < rowprice.length; i++) {
            System.out.print(rowprice[i] + " ");   
        }
    }
}
